import React, { useState } from 'react';
import { Card, Radio } from 'antd';
import DefinedPane from './definedPane';
import UndefinedPane from './undefinedPane';

const LogRetrieval = () => {
  const [value, setValue] = useState('defined');

  return (
    <Card bordered={false}>
      <Radio.Group
        style={{ marginBottom: 12 }}
        value={value}
        onChange={e => setValue(e.target.value)}
        buttonStyle="solid"
      >
        <Radio.Button value="defined">搜索列表</Radio.Button>
        <Radio.Button value="undefined">搜索任务</Radio.Button>
      </Radio.Group>
      {value === 'defined' ? <DefinedPane /> : <UndefinedPane />}
    </Card>
  );
};

export default LogRetrieval;
